package mundo;

public class EcuacionesDeRecurrencia {

	public static void main(String[] args) {
		for (int i = 0; i < 50; i++) {
			System.out.println(fT9(i));
		}
	}

	public int fT1(int n) {
		return (n==0)?1:(fT1(n-1)+n);
	}

	public int solucion1(double i) {
		return (int) (1+(i/2)+((i*i)/2));
	}
	
	public double fT3(double n) {
		double rta = 0;
		for (int i = 1; i <= n; i++) {
			rta+=(i/Math.pow(2, i));
		}
		return rta;
	}

	public int solucion3(double i) {
		return (int) (1+(i/2)+((i*i)/2)); //TODO
	}

	public static double fT9(double n) {
		return (n==0)?1:(3*Math.pow(fT9(n-1), 2));
	}

	public int solucion9(double i) {
		return (int) (1+(i/2)+((i*i)/2)); //TODO
	}
}
